feat: serve stack-specific default project favicons#3854
Conversation
When a project has no favicon, detect the project's stack and serve a matching default icon instead of the generic folder: React/React Native projects (react or react-native in package.json dependencies) get a React icon, Gradle-based Android projects get an Android icon. Detection failures degrade to the existing generic fallback. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…and social platforms Extends the stack-detection fallback to cover more common project types: - Next.js (detected before plain React, via 'next' dependency) - Angular (@angular/core), Svelte (svelte / @sveltejs/kit), Vue (vue / nuxt) - YouTube, TikTok, Instagram (detected by project directory name pattern) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Replace the multi-path robot body with a minimal 3-element head: semicircle dome + rounded-bottom rectangle body, two short angled antennae, and two eye circles. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Expo projects (mobile-first, no Gradle files at root) now get the Android icon via the `expo` dependency check. Also shrinks the body section of the Android SVG so it reads as a head rather than a full robot torso. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Spread the antenna tips further apart and reduce their length so they read more like the reference Android logo proportions. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 5e7467f. Configure here.
| return SVELTE_PROJECT_FAVICON_SVG; | ||
| if (dependencyNames.has("vue") || dependencyNames.has("nuxt")) return VUE_PROJECT_FAVICON_SVG; | ||
| if (dependencyNames.has("expo") || dependencyNames.has("react-native")) | ||
| return ANDROID_PROJECT_FAVICON_SVG; |
There was a problem hiding this comment.
React Native shows Android icon
Medium Severity
Projects with expo or react-native dependencies are incorrectly assigned the Android favicon. The current dependency check order returns the Android icon before the react check, which was intended for React Native projects.
Reviewed by Cursor Bugbot for commit 5e7467f. Configure here.
| return HttpServerResponse.text("Not Found", { status: 404 }); | ||
| } | ||
| if (asset.kind === "project-favicon-fallback") { | ||
| return HttpServerResponse.text(FALLBACK_PROJECT_FAVICON_SVG, { |
There was a problem hiding this comment.
Cached fallback hides stack changes
Medium Severity
The fallback favicon SVG is now dynamically generated based on workspace configuration, but the Cache-Control: max-age=3600 header means browsers can serve an outdated icon for up to an hour after configuration changes (e.g., package.json, Gradle files), as the asset URL doesn't change.
Reviewed by Cursor Bugbot for commit 5e7467f. Configure here.
ApprovabilityVerdict: Needs human review Two unresolved review comments identify bugs: React Native projects incorrectly receive the Android icon, and the caching behavior can serve stale favicons after configuration changes. These substantive issues require resolution before approval. You can customize Macroscope's approvability policy. Learn more. |


What Changed
When a project has no favicon, detect the project's stack and serve a matching default icon instead of the generic folder icon. Detection is based on
package.jsondependencies and filesystem markers:next) → Next.js logo@angular/core) → Angular shieldsvelte/@sveltejs/kit) → Svelte logovue/nuxt) → Vue chevronreact) → React logoreact-native/expo) → Android iconsettings.gradle/build.gradlepresent) → Android iconytoryoutube) → YouTube icontiktok) → TikTok iconinstagram/insta) → Instagram iconEverything else falls back to the existing generic folder icon. Detection failures also degrade gracefully to the generic fallback, so behavior only changes for projects that match a known stack.
Works on both the Web and Desktop apps.
Why
Makes the projects panel a bit more fun, not having the default folder icon everywhere, and makes it easier to distinguish between projects.
UI Changes
Before

After

Checklist
̶-̶ ̶[̶ ̶]̶ ̶I̶ ̶i̶n̶c̶l̶u̶d̶e̶d̶ ̶a̶ ̶v̶i̶d̶e̶o̶ ̶f̶o̶r̶ ̶a̶n̶i̶m̶a̶t̶i̶o̶n̶/̶i̶n̶t̶e̶r̶a̶c̶t̶i̶o̶n̶ ̶c̶h̶a̶n̶g̶e̶s̶ ==> no animation/interaction changes